package com.huiminpay.transaction.api.service;

import com.huiminpay.common.cache.domain.BusinessException;
import com.huiminpay.transaction.api.dto.PayChannelDTO;
import com.huiminpay.transaction.api.dto.PayChannelParamDTO;
import com.huiminpay.transaction.api.dto.PlatformChannelDTO;

import java.util.List;

/**
 * 平台接口：服务类型+支付渠道
 */
public interface PlatformChannelServiceApi {

    //获取平台服务类型列表
    public List<PlatformChannelDTO> findAllPlatformChannel();

    //为应用绑定服务类型
    public void bindPlatformChannelForApp(String appId, String platformChannelCode) throws BusinessException;

    //查看应用是否已绑定该服务类型
    public String existBindPlatformForApp(String appId, String platformChannelCode) throws BusinessException;

    //==========================================

    //根据服务类型code查询第三方支付渠道列表信息
    public List<PayChannelDTO> queryPayChannelByPlatformChannel(String platformChannelCode) throws BusinessException;

    //保存第三方支付渠道参数信息
    public PayChannelParamDTO savePayChannelParam(PayChannelParamDTO payChannelParamDTO) throws BusinessException;

    /**
     * 获取指定应用指定服务类型下所包含的某个原始支付参数
     * @param appId
     * @param platformChannel
     * @param payChannel
     * @return
     */
    public PayChannelParamDTO queryParamByAppPlatformAndPayChannel(String appId, String platformChannel, String payChannel);

    /**
     * 获取指定应用指定服务类型下所包含的原始支付渠道参数列表
     * @param appId
     * @param platformChannel
     * @return
     */
    public List<PayChannelParamDTO> queryParamListByAppPlatformAndPayChannel(String appId, String platformChannel);

}
